Automating the determination of macromolecular structures by X-ray crystallography is crucial for producing new advances and discoveries in structural biology. Many of the preliminary steps, such as crystallization and data collection, have benefitted from recent advances in technology, and development of new computational techniques (and faster computers) has made the refinement of phases and generation of electron density maps more efficient and accurate. However, the final step of interpreting the electron density map and constructing a model with atomic coordinates has resisted automation and remains one of the primary bottlenecks to streamlining large-scale structural genomics projects. We propose a novel approach to automated model-building based on the principles of pattern recognition, specifically by searching for matching regions with similar patterns of density in a database of previously solved maps, using calculated numerical features. This approach has been implemented in an automated model-building system called TEXTAL, and preliminary results show that it is capable of predicting local molecular structures (e.g. side-/main-chain atoms of a residue) that can be assembled to form global models with coordinate RMS errors in the range of 0.75A, when initial locations of C-alpha atoms are precisely known. In this proposal, we hypothesize that 1) pattern recognition can also be used to accurately identify the locations of C-alpha atoms in a map, 2) that local models can be improved by exploiting information from nearby regions, such as via amino acid identity, main chain direction, secondary structure, and tertiary, and tertiary contacts, and 3) the models output by TEXTAL can be improved through a combination of real-space and reciprocal-space refinement. In addition, as part of the program project, we will develop an interface for TEXTAL as a software component in PHENIX, the proposed integrated crystallography system written in the Python scripting language. Finally, one of the new challenges presented by this integrated system is how to use the various components in an efficient and effective way to solve structures from datasets automatically. This involves complex decision-making under certainty to decide which programs to run (and parameters to set) that will most likely lead to a solution of high quality. We propose to implement an intelligent decision-making algorithm to use within PHENIX based on decision theory in intelligent agents, i.e. selecting actions that maximize expected utility. Such an approach is a necessary step toward fully utilizing the expanded capabilities of an integrated system for automated structure determination, by capturing the flexible decision-making process human crystallographers use in the overall process of solving structures.